<template>
    <div id="U_info">
      <div class="copyright-content">
		    <div id="copy_right_content">
			    <div class="content-left">
				    <leftMenu @changeLeftMenu="changeMenu" :isActive="isActive" :Menulists = "Menulists"></leftMenu>
			    </div>
			    <div class="content-right">
            <router-view></router-view>
			    </div>
		    </div>
	    </div>
    </div>
</template>
<script>
import leftMenu from "../../copyRight/leftMenu/leftMenu";
export default {
  components: {
    leftMenu
  },
  data() {
    return {
      isActive: 0,
      Menulists: [
        {
          rightName: "主体信息"
        },
        {
          rightName: "消费管理"
        },
        {
          rightName: "用户管理"
        }
      ]
    };
  },
  watch: {
    $router() {
      this.isActive = this.$route.query.type;
    }
  },
  mounted() {
    this.InitIsC();
    console.log(this.$store);
  },
  methods: {
    changeMenu(value) {
      this.isActive = value;
      switch (this.isActive) {
        case 0:
          this.$router.push({
            path: `/UserInfo/UserBase`,
            query: {
              type: value
            }
          });
          break;
        case 1:
          this.$router.push({
            path: `/UserInfo/UserPay`,
            query: {
              type: value
            }
          });
          break;
        case 2:
          this.$router.push({
            path: `/UserInfo/UserMussion`,
            query: {
              type: value
            }
          });
          break;
      }
    },
    InitIsC() {
      this.isActive = this.$route.query.type;
      switch (this.isActive) {
        case 0:
          this.$router.push({
            path: `/UserInfo/UserBase`,
            query: {
              type: 0
            }
          });
          break;
        case 1:
          this.$router.push({
            path: `/UserInfo/UserPay`
          });
          break;
        case 2:
          this.$router.push({
            path: `/UserInfo/UserMussion`
          });
          break;
      }
    }
  }
};
</script>
<style scoped>
@import "../../copyRight/copyRight.css";
.content-right {
  /* background-color: transparent !important; */
  -webkit-box-shadow: none !important;
}
</style>


